#pragma once

#include <windows.h>
#include <gl\gl.h>
#include <gl\glu.h>
#include <cg\cg.h>
#include <cg\cggl.h>

#include "IResources.h"
#include "IAutoLoadResources.h"
#include "Shader.h"

#include <string>
#include <map>

class ShaderManager : public IResources<Shader*>, public IAutoLoadResources
{
private:
	std::map<std::string, Shader*> shaders;
	CGcontext context;
	CGprofile profile;

public:
	ShaderManager(CGcontext context, CGprofile profile);
	~ShaderManager(void);

	void Load(const char *path, const char *ext);
	void Add(const char *name, Shader *res);
	Shader * Get(const char *name);

	int GetCount();
	void Get(int i, char *name, Shader *&res);
};
